/**
 * 收藏相关的JavaScript函数
 */

/**
 * 添加收藏
 * @param goodsId 商品ID
 */
function addFavorite(goodsId) {
    // 跳转到添加收藏的Servlet
    window.location.href = "favorite_add?goodsid=" + goodsId;
}

/**
 * 取消收藏
 * @param goodsId 商品ID
 */
function removeFavorite(goodsId) {
    // 跳转到取消收藏的Servlet
    window.location.href = "favorite_delete?goodsid=" + goodsId;
}